package com.itheima.config;

import com.itheima.config.postProcessor.MyBeanFactory;
import com.itheima.config.registrar.MyImportBeanDefinitionRegistrar;
import com.itheima.config.seletor.MyImportSelector;
import org.springframework.context.annotation.*;

/**
 * @program: Spring_day01_01_IOC入门程序
 * @description:
 * @author: xuejingjing
 * @create: 2021-08-01 18:54
 **/
@Configuration
@ComponentScan("com.itheima")
//@ComponentScan("com.itheima")
//指定排除扫描哪些类
//@ComponentScan(
//        value="com.itheima",
//        excludeFilters = @ComponentScan.Filter(
//                type = FilterType.ANNOTATION,
//                classes = Service.class
//        )
//)

/*自定义扫描器*/
//@ComponentScan(
//        value="com.itheima",
//        excludeFilters = @ComponentScan.Filter(
//                type = FilterType.CUSTOM,
//                classes = MyTypeFilter.class
//        )
//)
@PropertySource("classpath:jdbc.properties") //加载数据源
@Import({JDBCConfig.class,MybatisConfig.class,MyImportSelector.class,
        MyImportBeanDefinitionRegistrar.class,
        MyBeanFactory.class
}) //让spring只用这个导入器
public class SpringConfig {

}
